<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/page/common/public.jspf"%>
<%@ page import="com.hengpeng.itfints.tools.PageUtil"%>
<%
    PageUtil pageUtil = (PageUtil) request.getAttribute("PageUtil");
	Object obj = request.getAttribute("recommendCode");
	String recode = obj == null ? "" : String.valueOf(obj);
%>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="${skin}/v1.min.css?v=${v}" />
<link rel="stylesheet" type="text/css" href="${skin}/index.css?v=${v}" />

<link rel="stylesheet" type="text/css"
	href="//assets7.ncfstatic.com/v1/css/user.css?v=${v}" />
<link href="//assets6.ncfstatic.com/v1/css/yaoqingma.css?v=${v}"
	rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css"
	href="//assets8.ncfstatic.com/v1/css/user_v2.css?v=${v}" />
<link rel="stylesheet" type="text/css"
	href="http://assets5.ncfstatic.com/v1/css/user_share.css?v=${v}" />
<link rel="stylesheet" type="text/css" href="${skin }/paginate.v1.css">

<script type="text/javascript"
	src="${path }/js/jquery1.10.2.min.js?v=${v}"></script>
<script type="text/javascript" src="${path }/js/v1.min.js?v=${v}"></script>
<!--  <script type="text/javascript" src="${path }/page/account/reward/jquery.min.js"></script>--><!-- 与v1.min.js冲突 -->
<script type="text/javascript" src="${path }/page/account/reward/ZeroClipboard.js"></script>
<title>${configUtil.sitename}-我的邀请码</title>
</head>

<body>
	<!-- head -->
	<c:import url="../../include/top.jsp"></c:import>

	<div class="wrap">
		<div class="blank"></div>
		<div class="user_nav f_l mr5">
			<c:import url="../left.jsp">
				<c:param name="type" value="reward"></c:param>
			</c:import>
		</div>
		<div class="user_right f_l">
			<!--private js&css start-->

			<div class='user_right f_l'>
				<div class="user_right_box  mb10 pb15">
					<div class="user_title">
						<h1>
							<i class="ico_yaoqing"></i>我的邀请码
						</h1>
					</div>
					<div class="youhui">
						<!-- <div class="icon_yh"></div>-->

						<!--<p>您的邀请码总利率合计是0.20%

                <p>-->
						<p style="margin: 10px 0px 0px 0px;">
							<span style="font-size: 16px; color: #ff6600;">嘘寒问暖，不如打笔巨款，魔环携款4000+万，快和宝宝一起赚！</span>
						</p>
						<p>
							<span style="font-size: 12px; color: #5c585a;"><b>奖励一：邀请好友得红包</b></span>
						</p>
						<p>
							<span style="font-size: 12px; color: #5c585a;">即日起，成功邀请好友注册（如：邀请好友A）……</span>
						</p>
						<p></p>
						<p><span style="font-size: 12px; color: #5c585a;">则：</span></p>
						<p><span style="font-size: 12px; color: #5c585a;">1.A邀请好友B，B可获得30元红包，A可获得10元红包；</span></p>
						<p><span style="font-size: 12px; color: #5c585a;">2.B邀请好友C，C可获得30元红包，B可获得10元红包，A可获得5元红包；</span></p>
						<p><span style="font-size: 12px; color: #5c585a;">3.C邀请好友D，D可获得30元红包，C可获得10元红包，B可获得5元红包，A可获得2元红包。</span></p>
						
						<p>
							<span style="font-size: 12px; color: #5c585a;"><b>奖励二：邀请好友享返利</b></span>
						</p>
						<p>
							<span style="font-size: 12px; color: #5c585a;">魔环金融返利模式</span>
						</p>
						<p>
							<span style="font-size: 12px; color: #5c585a;">1.A推荐好友B理财后，B可获得年化利率1%的额外收益，A可获得年化利率0.5%的额外收益；</span>
						</p>
						<p>
							<span style="font-size: 12px; color: #5c585a;">2.B推荐好友C理财后，C可获得年化利率1%的额外收益，B可获得年化利率0.5%的额外收益，A可获得年化利率0.5%的额外收益；</span>
						</p>
						<p>
							<span style="font-size: 12px; color: #5c585a;">3.C推荐好友D理财后，D可获得年化利率1%的额外收益，C可获得年化利率0.5%的额外收益，B可获得年化利率0.5%的额外收益，A可获得年化利率0.5%的额外收益。</span>
						</p>
						<p>
							<span style="font-size: 12px; color: #5c585a;">（小魔掐指一算……）</span>
						</p>
						<p><span style="font-size: 12px; color: #5c585a;"><span style="color:#35a535;">若A推荐给B（200人）理财，</span> </span></p>
						<p><span style="font-size: 12px; color: #5c585a;"><span style="color:#35a535;">B（200人）推荐C（200人×200人）理财，</span> </span></p>
						<p><span style="font-size: 12px; color: #5c585a;"><span style="color:#35a535;">C（200人×200人）推荐D（200人×200人×200人）理财。如此计算，将有800万人，若人均投资1000元，就有80亿元的理财资金，A按照0.5%可获得收益的提成将达到<span style="color:red;">4000+万</span>哦！</span> </span></p>

						<p>
							<span style="font-size: 12px; color: #5c585a;"><b>奖励三：投资再享等额红包</b></span>
						</p>
						<p>
							<span style="font-size: 12px; color: #5c585a;">魔环用户凡投资购买理财产品后，将可获得与投资金额相等的投资红包！投资红包封顶10000元。</span>
						</p>
						<p></p>
						<p><span style="font-size: 12px; color: #5c585a;">当投资时，所投金额达到或超过红包金额的100倍后，投资红包即可使用！</span></p>
						<p><span style="font-size: 12px; color: #5c585a;">您也可将投资红包分享出去，和好友一起享受投资乐趣。</span></p>
						<div class="cou_t_div">
							<table width="100%" class="cou_tab">
								<colgroup>
									<col width="130">
									<!--<col width="110">-->
									<col width="110">
									<col width="460">
								</colgroup>
								<thead>
									<tr>
										<td>
											<div class="tl">邀请码</div>
										</td>
										<!--<td>投资人返利</td>-->
										<td>您的返利</td>
										<td>链接</td>
									</tr>
								</thead>
								<tr>
									<td><strong class="color-red1 f16 fw"  style="font-size: 14px;">${recommendCode}</strong></td>
									<!--<td>0.10%</td>-->
									<td>1%</td>
									<td>
										<div class="copy_link">
											<span class="link_box"  style="font-size: 14px;"><m:xml key="page.website"></m:xml>/page/register/step_one_register.jsp?recode=${recommendCode}</span>
										</div>
									</td>
								</tr>
							</table>
						</div>
						<div class="p_user_share clearfix">
							<div class="share_jt fl">
								<div class="t">
									<span>方式一：</span> 通过社交平台邀请
								</div>
								<div class="jiathis_style_32x32 clearfix">
									<a class="jiathis_button_weixin"></a> <a
										class="jiathis_button_tsina"></a> <a
										class="jiathis_button_qzone"></a> <a
										class="jiathis_button_renren"></a> <a
										class="jiathis_button_tqq"></a> <a
										href="http://www.jiathis.com/share"
										class="jiathis jiathis_txt jtico jtico_jiathis"
										target="_blank"></a>
								</div>
							</div>
							<div class="share_copy fr">
								<div class="t">
									<span>方式二：</span> 发送邀请链接给好友
								</div>
								<a class="share_copy_btn link_but" href="javascript:void(0)"
									data-clipboard-target="il_text" data-clipboard-text="" id="d_clip_button">点击复制链接</a>
							</div>
						</div>
						<script>
							var jiathis_config = {
								boldNum : 0,
								showClose : false,
								url : "http://www.mhp2p.com/page/register/step_one_register.jsp?recode=<%=recode%>",
								summary : '高收益浓情甜蜜，福利味道飘香四溢，魔环理财神器一出，收益Duang上去！分享财富以“利”会友，享受傲娇投资的喜悦吧！填我的邀请码<%=recode%>，还有额外返利送哦！'
							}
						</script>
						<script type="text/javascript"
							src="http://v3.jiathis.com/code/jia.js" charset="utf-8"></script>
					</div>
				</div>
				<!-- <div class="user_right_box  mb10 pb20">
					<div class="user_title">
						<h1>
							<i class="ico_yaoqing"></i>示例
						</h1>
					</div>
					<table class="yqjilu" height="226" width="665">
						<colgroup>
							<col width="100" />
							<col width="150" />
							<col width="100" />
							<col width="120" />
							<col width="80" />
						</colgroup>
						<thead>
							<tr>
								<th>单笔投资金额</th>
								<td>年化返利利率</td>
								<td>投资期限</td>
								<td>公式</td>
								<td>返利</td>
							</tr>
						</thead>
						<tbody>
							<tr>
								<th>100万元</th>
								<td>0.1%</td>
								<td>12个月</td>
								<td>1000000*0.1%</td>
								<td>1000元</td>
							</tr>
							<tr class="tr_bg">
								<th>100万元</th>
								<td>0.1%</td>
								<td>9个月</td>
								<td>1000000*0.1%/12*9</td>
								<td>750元</td>
							</tr>
							<tr>
								<th>100万元</th>
								<td>0.1%</td>
								<td>6个月</td>
								<td>1000000*0.1%/12*6</td>
								<td>500元</td>
							</tr>
							<tr class="tr_bg">
								<th>100万元</th>
								<td>0.1%</td>
								<td>3个月</td>
								<td>1000000*0.1%/12*3</td>
								<td><p>250元</p></td>
							</tr>
						</tbody>
					</table>

				</div> -->
				<div class="user_right_box  mb10 pb20">
					<div class="user_title">
						<h1>
							<i class="ico_yaoqing"></i>返利记录<!-- <span class="f16 pl10">(<span>您已累计邀请&nbsp;0</span>
								人， 获得返利 <em class="color-yellow1">0.00</em> 元， 待返金额 <em
								class="yanzheng">0.00</em> 元) -->
							</span>
						</h1>
					</div>
					<!-- 查询 -->
					<div class="invite_search">
						<form id="ss_form" type="get" action="/account/coupon">
							<div class="clearfix">
								<div class="ss_tit">返利类型</div>
								<div class="ui_select_box" data-name="status" id=""
									style="z-index: 11">
									<div class="j_select"></div>
									<ul class="select_ul none j_selectContent">
										<li data-value="UNACTIVE" data-select=true>未激活</li>
										<li data-value="CANPAY">可返还未返</li>
										<li data-value="PAID">已返</li>
										<li data-value="ABANDON">已作废</li>
									</ul>
								</div>
								<input type="hidden" name="type" value="" />
								<div class="sel_time">
									<span>时间</span> <input type="text" class="time_box"
										id="dateInput1" name="date_start" value="${startTime }"><span
										class="pl10">-</span><input type="text" class="time_box"
										id="dateInput2" name="date_end" value="${endTime }">
								</div>
								<input type="button" value="筛选" class="button_shaixian fr">
							</div>
						</form>
						<div class="ss_error color-red" style="display: none">手机号/姓名格式不正确！</div>
					</div>
					<!-- //查询 -->
					<table class="yqjilu">
						<colgroup>
							<col width="97">
							<col width="97">
							<col width="115">
							<col width="170">
						</colgroup>
						<thead>
							<tr>
								<td><div class="tl">获得时间</div></td>
								<td><div class="tl">支付时间</div></td>
								<td><div class="tl">返利金额(元)</div></td>
								<td><div class="tl">状态</div></td>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${dataList }" var="item" varStatus="vstatus">
								<c:choose>
									<c:when test="${vstatus.index%2 == 0}">
										<tr>
											<td><fmt:formatDate value="${item.gettime}" type="both"
													pattern="yyyy/MM/dd HH:mm" /></td>
											<td><fmt:formatDate value="${item.paytime}" type="both"
													pattern="yyyy/MM/dd HH:mm" /></td>
											<td>${item.money / 100}</td>
											<td>${item.status.text}</td>
										</tr>
									</c:when>
									<c:otherwise>
										<tr class="tr_bg">
											<td><fmt:formatDate value="${item.gettime}" type="both"
													pattern="yyyy/MM/dd HH:mm" /></td>
											<td><fmt:formatDate value="${item.paytime}" type="both"
													pattern="yyyy/MM/dd HH:mm" /></td>
											<td>${item.money / 100}</td>
											<td>${item.status.text}</td>
										</tr>
									</c:otherwise>
								</c:choose>
							</c:forEach>
						</tbody>
					</table>
				</div>
				<c:import url="../../include/true_paging.jsp"></c:import>
				<script>
					(
									function($) {
										$(function() {
											$(".select_ul>li")
													.bind(
															"click",
															function() {
																if ($(this)
																		.text() != "全部"
																		|| $ipt_txt
																				.val() != "") {
																	$(
																			"#ss_clear")
																			.show();
																} else {
																	$(
																			"#ss_clear")
																			.hide();
																}
															})
											var $ipt_txt = $(".invite_search .ipt_txt"), userVerify = "", errorSpan = $(".ss_error"), loadurl = window.location.href, _set = function(
													msg) {
												errorSpan.css("display",
														"block");
												errorSpan.html(msg);

											}, _reset = function() {
												errorSpan
														.css("display", "none");

											}, setpro = function() {
												userVal = $
														.trim($ipt_txt.val());
												userVerify = (userVal == "")
														|| /^[\u0391-\uFFE5]{2,12}$|^1[3|4|5|7|8][0-9]\d{8}$/
																.test(userVal);
												$ipt_txt.val(userVal);

												if ($(
														".invite_search .j_select")
														.text() != "全部"
														|| $ipt_txt.val() != "") {

													$("#ss_clear").show();
												} else {
													$("#ss_clear").hide();
												}
											};
											$("#ss_clear")
													.click(
															function() {
																$ipt_txt
																		.val("");
																$(
																		".invite_search .j_select")
																		.text(
																				"全部");
																var pos = loadurl
																		.indexOf("?");
																if (pos != -1) {
																	loadurl = loadurl
																			.substring(
																					0,
																					pos);
																}
																window.location
																		.replace(loadurl);
															});
											$ipt_txt.blur(function() {
												setpro();
												if (!userVerify) {
													$("#ss_result").hide();
													_set("手机号/姓名格式不正确！");
												} else {
													_reset();
												}
											});
											$("#ss_form").submit(function() {
												setpro();
												if (!userVerify) {
													return false;
												} else {
													return true;
												}
											});

											//下拉菜单
											$(".j_select").css({
												"color" : "#333",
												"font-size" : "14px"
											});
											$(".ui_select_box").select();
											//IE9以下浏览器不支持placeholder   
											$(".int_placeholder")
													.each(
															function() {
																var p_text = $(
																		this)
																		.attr(
																				"data-placeholder");
																new Firstp2p.placeholder(
																		this,
																		{
																			placeholder_text : p_text == null ? "请输入"
																					: p_text
																		});
															});
										});
									})(jQuery);
				</script>

				<script>
				$(function() {
					ZeroClipboard.setMoviePath("${path }/page/account/reward/ZeroClipboard.swf");
					var clip = new ZeroClipboard.Client();
					clip.setHandCursor(true);
					clip.addEventListener("mouseUp", function(client) {
						alert("复制链接成功！");
					});
					clip.setText($('.link_box').text());
					clip.glue('d_clip_button');
				});
				
					var num = $('.link_but');
					$(".button_shaixian").click(function(){
						var status = $('#status').val();
						var startTime = $('#dateInput1').val();
						var endTime = $('#dateInput2').val();
						window.location.href = "<%=request.getContextPath()%>/rebate/list.htm?curPage=1&status="+status+"&startTime="+startTime+"&endTime="+endTime;
					});
					$(function(){
						var vstatus = '${status}';
						if(vstatus == 'UNACTIVE'){
							$('.j_select').text('未激活');
							$('#status').attr("value","UNACTIVE");
						}else if(vstatus == 'CANPAY'){
							$('.j_select').text('可返还未返');
							$(".tl").eq(2).html("支付时间");
							$('#status').attr("value","CANPAY");
						}else if(vstatus == 'PAID'){
							$('.j_select').text('已返');
							$('#status').attr("value","PAID");
						}else{
							$('.j_select').text('已作废');
							$('#status').attr("value","ABANDON");
						}
					});
					//分页
					function go (page) {
						var startTime = $('#dateInput1').val();
						var endTime = $('#dateInput2').val();
						window.location.href = "<%=request.getContextPath()%>/rebate/list.htm?curPage="+ page+ "&status=${status}&startTime="+ startTime + "&endTime=" + endTime;
					}
				</script>
			</div>
		</div>

		<div class="blank"></div>

	</div>

	<c:import url="../../include/foot.jsp"></c:import>
</body>
</html>